;; Simple test to demonstrate memory leak

(begin
    (display "Testing memory leak in begin\n")
    (define counter 0)
    (define increment (lambda () (begin (define counter (+ counter 1)) counter)))
    (increment)
    (increment)
    (increment)
    (display "Counter test completed\n")
)